body {
    overflow-x: hidden; /* 隐藏水平滚动条 */
}

.header {
    background-color: blue;
    padding: 10px 0px;
    text-align: center;
}

.container {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    background-color: #fff;
}

.h1 {
    color: white;
}

.category:hover {
    background-size: 100% 2px;
}

.category-bar {
    display: flex;
    background-color: white;
    padding: 20px;
}

.category {
    background: white;
    border: none;
    padding: 5px 20px;
    font-size: 20px;
    color: black;
    cursor: pointer;
    font-weight: bold;
    background-image: linear-gradient(greenyellow,greenyellow);
    background-position: center bottom;
    background-size:0 2px;
    background-repeat: no-repeat;
    transition: .3s;
}

.sub-category-bar {
    display: flex;
    justify-content: space-around;
    background-color: lightgray;
    padding: 5px 0;
    font-size: 14px;
}

.sub-category {
    font-size: 17px; /* 默认字体大小 */
    padding: 5px 1px; /* 根据需要调整 */
    border: none;
    cursor: pointer;
    background-color: lightgray;
    background-image: linear-gradient(greenyellow,greenyellow);
    background-position: center bottom;
    background-size:0 2px;
    background-repeat: no-repeat;
    transition: .3s;
    flex: 1; /* 让按钮填充除图片外的所有可用空间 */
}

/* 屏幕宽度小于600px时 */
@media (max-width: 600px) {
    .sub-category {
        font-size: 14px; /* 较小字体大小 */
    }
}

/* 屏幕宽度小于400px时 */
@media (max-width: 400px) {
    .sub-category {
        font-size: 12px; /* 更小字体大小 */
    }
}


/* .sub-category:hover {
    background-size: 100% 2px;
} */

.contact-list {
    list-style: none;
}

.contact {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    border-bottom: 1px solid #ddd;
}

.avatarimg {
    width: 50px;
    height: 50px;
    margin-right: 10px;
    border-radius: 25px;
}


.details img {
    width: 20px;
    height: 20px;
}


.info h2, .info p {
    margin: 0;
    font-size: 16px;
}

.info h2 {
    font-size: 15px;
    display: flex;
    align-items: center;
}

.small-icon {
    width: 16px;
    height: 16px;
    margin-left: 5px;
}

.small-icon1 {
    width: 10px;
    height: 10px;
    margin-right: 5px;
}

.details {
    display: flex;
    flex-direction: column;
}

.info p {
    font-size: 14px;
    color: gray;
}



.extra-info {
    display: flex;
    align-items: center;
    color: blue;
    border-left: 10px;
}

.last-message {
    display: flex;
    flex-direction: column;
    align-items:end;
    margin-left: auto;
}

.last-message img.phone-icon {
    width: 40px;
    height: 40px;
    margin-bottom: 4px;
    position: static;
}

.last-message p {
    margin: 0;
    font-size: 13px;
    color: gray;
}


/* 屏幕宽度小于400px时 */
@media (max-width: 400px) {
    .last-message p{
        font-size: 11px; /* 较小字体大小 */
    }
}

@media (max-width: 370px) {
    .last-message p{
        font-size: 9px; /* 较小字体大小 */
    }
}

/* 模态框基本样式 */
.modal {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 1000; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
    transition: opacity 0.4s ease; /* Smooth transition for background */
}

.modal-content {
    background-color: #fff;
    margin: 10% auto; /* Adjusted margin from top */
    padding: 20px;
    border: 1px solid #888;
    width: 50%; /* Adjust width for better desktop appearance */
    box-shadow: 0 4px 8px rgba(0,0,0,0.1); /* Shadow for 3D effect */
    border-radius: 10px; /* Rounded corners */
    transition: transform 0.3s ease-out; /* Smooth transform transition */
    transform: translateY(-50px); /* Initial transform state */
}

.modal-content.active {
    transform: translateY(0); /* End state of transform */
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close:hover,
.close:focus {
    color: #333;
    cursor: pointer;
    text-decoration: none;
}

/* 增强按钮样式 */
.modal button {
    border: none;
    padding: 10px 20px;
    margin: 10px;
    border-radius: 5px;
    background-color: #5C67F2; /* Pleasant blue */
    color: white;
    cursor: pointer;
    transition: background-color 0.3s;
}

.modal button:hover {
    background-color: #4a54e1; /* Slightly darker on hover */
}

/* 文本和标题样式优化 */
h2 {
    font-size: 24px; /* Larger font size for heading */
    margin-bottom: 10px;
}

p {
    line-height: 1.5; /* Better line spacing for readability */
    color: #555; /* Softer color for text */
}

.arrow {
    width: 10px;
    height: auto;
    cursor: pointer;
    transition: transform 0.3s;
    display: inline-block;
}

.arrow.up {
    transform: rotate(180deg);  // 向上旋转
}




